package com.fit.entities.weekdays;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.apache.tapestry5.beaneditor.NonVisual;

import com.fit.entities.shedule.Shedule;

@Entity
@Table(name="weekDays")
public class WeekDays {

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@NonVisual
	@Column(name="day_id")
	private Long dayId;
	
	 @Column(name="day", nullable=false)
	 private String dayInWeek;
	 
		@OneToMany(fetch = FetchType.LAZY, mappedBy = "pk.day")
		private List<Shedule> shedules = new LinkedList<Shedule>();

	public Long getDayId() {
		return dayId;
	}

	public void setDayId(Long dayId) {
		this.dayId = dayId;
	}

	public String getDayInWeek() {
		return dayInWeek;
	}

	public void setDayInWeek(String dayInWeek) {
		this.dayInWeek = dayInWeek;
	}
	 
	 
	 
}
